const express = require('express');
const router = express.Router();
const LogsController = require('../controller/logsController');
const authMiddleware = require('../middleware/authMiddleware');


// 获取日志列表
router.get('/', LogsController.getLogs);

//删除日志(只允许系统管理员删除)
router.delete('/:id', authMiddleware, LogsController.deleteLog);

// 添加日志
router.post('/', authMiddleware, LogsController.addLog);

module.exports = router;